home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / mkutil21.zip / MAKEDEFS / SC16.MK < prev    next >
Text File  |  1995-02-06  |  4KB  |  136 lines

  1. #############################################################################
  2. #
  3. #                       Copyright (C) 1994 SciTech Software
  4. #                               All rights reserved.
  5. #
  6. # Descripton:   Generic DMAKE startup makefile definitions file. Assumes
  7. #               that the SCITECH environment variable has been set to point
  8. #               to where all our stuff is installed. You should not need
  9. #               to change anything in this file.
  10. #
  11. #               Symantec C++ 6.1 16 bit version.
  12. #
  13. # $Id: sc16.mk 1.1 1995/02/06 12:49:39 kjb release $
  14. #
  15. #############################################################################
  16.  
  17. # Disable warnings for macros redefined here that were given
  18. # on the command line.
  19. __.SILENT       := $(.SILENT)
  20. .SILENT         := yes
  21.  
  22. # File suffix definitions
  23.    L            := .lib   # Libraries
  24.    E            := .exe   # Executables
  25.    O            := .obj   # Objects
  26.    A            := .asm   # Assembler sources
  27.    P            := .cpp   # C++ sources
  28.  
  29. # Import enivornment variables that we use
  30. TMPDIR := $(ROOTDIR)/tmp
  31. .IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA FPU
  32. .IMPORT .IGNORE : USE_WIN16
  33.  
  34. # We use the MSDOS shell at all times
  35.    SHELL        := $(COMSPEC)
  36.    GROUPSHELL   := $(SHELL)
  37.    SHELLFLAGS   := $(SWITCHAR)c
  38.    GROUPFLAGS   := $(SHELLFLAGS)
  39.    SHELLMETAS   := *"?<>
  40.    GROUPSUFFIX  := .bat
  41.    DIRSEPSTR    := \\
  42.    DIVFILE       = $(TMPFILE:s,/,\)
  43.  
  44. # Default commands for compiling, assembling linking and archiving
  45.    CC           := sc       # C-compiler and flags
  46.    CFLAGS       := -ml -Jm
  47.    AS           := tasm     # Assembler and flags
  48.    ASFLAGS      := /mx /m /D__COMM__ /i$(SCITECH)\INCLUDE
  49.    LD           := sc       # Loader and flags
  50.    LDFLAGS       = $(CFLAGS)
  51.    LIB          := lib      # Librarian
  52.    LIBFLAGS     := /N /B
  53.  
  54. # Optionally turn on debugging information
  55. .IF $(DBG)
  56.    CFLAGS       += -g       # Turn on debugging for C compiler
  57. .END
  58.  
  59. # Optionally turn on optimisations
  60. .IF $(OPT)
  61.    CFLAGS       += -5 -o+all
  62. .END
  63.  
  64. # Optionally turn on direct i387 FPU instructions
  65.  
  66. .IF $(FPU)
  67.    CFLAGS       += -ff -DFPU387
  68.    ASFLAGS      += -DFPU387 -DFPU_REG_RTN
  69. .END
  70.  
  71. # Optionally compile a shareware version of a product
  72. .IF $(SHW)
  73.    LIB_DIR      := LIBSW
  74.    CFLAGS       += -DSHAREWARE
  75. .ELSE
  76.    LIB_DIR      := LIB
  77. .END
  78.  
  79. # Optionally compile a beta release version of a product
  80. .IF $(BETA)
  81.    CFLAGS       += -DBETA
  82.    ASFLAGS      += -DBETA
  83. .END
  84.  
  85. # User a larger stack if requested
  86.  
  87. .IF $(STKSIZE)
  88.     LDFLAGS     += =$(STKSIZE)
  89. .ENDIF
  90.  
  91. # Optionally compile for 16 bit Windows DPMI
  92. .IF $(USE_WIN16)
  93.    DX_CFLAGS    += -DWINDPMI16
  94.    DX_ASFLAGS   += -DWINDPMI16 -D__PM286__
  95. .END
  96.  
  97. # Place to look for PMODE library files
  98.  
  99. .IF $(MK_PMODE)
  100. .ELIF $(USE_WIN16)
  101. PMLIB           := win16\pmode.lib
  102. .ELSE
  103. PMLIB           := pmode.lib
  104. .END
  105.  
  106. # Define where to install library files
  107.    LIB_BASE     := $(SCITECH)\$(LIB_DIR)\SC16
  108.    LIB_DEST     := $(LIB_BASE)
  109.  
  110. # Definition of $(MAKE) macro for recursive makes.
  111.    MAKE = $(MAKECMD) $(MFLAGS)
  112.  
  113. # Macro to install a library file
  114.    INSTALL      := cp
  115.  
  116. # Implicit generation rules for making object files
  117.    %$O: %.c ; +$(CC) $(CFLAGS) -c $<
  118.    %$O: %$P ; +$(CC) $(CFLAGS) -c $<
  119.    %$O: %$A ; +$(AS) $(ASFLAGS) $(<:s,/,\)
  120.  
  121. # Implicit rule for building a library file using response file
  122.    %$L: ; +$(LIB) $(LIBFLAGS) $@ @$(mktmp -+$(?:t" &\n-+")\n)
  123.  
  124. # Implicit rule for building an executable file using response file
  125.    %$E: ; +$(LD) $(LDFLAGS) -e$@ @$(mktmp $(&:s/\/\\) $(PMLIB) $(EXELIBS))
  126.  
  127. # DMAKE uses this recipe to remove intermediate targets
  128. .REMOVE :; $(RM) -f $<
  129.  
  130. # Turn warnings back to previous setting.
  131. .SILENT := $(__.SILENT)
  132.  
  133. # We dont use TABS in our makefiles
  134. .NOTABS         := yes
  135.  
  136.